package com.financing.model.invest;
import com.financing.model.base.BaseCouponLog;
import com.financing.util.Str;

@SuppressWarnings("serial")
public class CouponLog extends BaseCouponLog<CouponLog> {
	public static final CouponLog me = new CouponLog().dao();
	public static final String id = "id";
	// 用户ID
	public static final String userId = "user_id";
	// 优惠券ID
	public static final String couponId = "coupon_id";
	// 红包：tzhb  现金：xjhb  体验金：tyj  加息券：jxq
	public static final String type = "type";
	// 状态：正常 normal 已使用 used 已过期 expire
	public static final String status = "status";
	// 额度：红包 10元 加息券 1%
	public static final String amount = "amount";
	// 使用范围： 新手标：first 1月标：30day 3月标：90day 6月标：180day 12月标：360day 体验标：experi 
	public static final String allowBid = "allow_bid";
	// 领取时间
	public static final String createTime = "create_time";
	// 使用时间
	public static final String applyTime = "apply_time";
	// 用途：投资 invest 提现 withdraw
	public static final String summary = "summary";
	// 用途ID：用于投资的交易ID
	public static final String tradeId = "trade_id";
	// 单笔投资满额
	public static final String limitAmount = "limit_amount";
	// 可使用开始日期
	public static final String validStartTime = "valid_start_time";
	// 可使用结束日期
	public static final String validEndTime = "valid_end_time";
	// 是否显示
	public static final String isShow = "is_show";
	// 获取来源
	public static final String access = "access";
	// 外部链接
	public static final String link = "link";
	// 是否已提醒
	public static final String isNotify = "isNotify";

	/**
	 * 根据名称获取数据
	 */
	public String getName() {
		String couponName= this.getAmount()+"元红包";
		if(Str.eq("jxq", this.getType())){
			couponName = this.getAmount()+"%加息券";
		}else if(Str.eq("tyj", this.getType())){
			couponName = this.getAmount()+"元体验金";
		}
		return couponName;
	}
}